package com.msh.artascope.devcloud.service.model.vo;

import com.msh.artascope.devcloud.service.define.DevCloudDef;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Set;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@ToString(callSuper = true)
@Schema(name = "环境复制Vo")
public class EnvCopyVo implements Serializable {

  @NotNull(groups = {DevCloudDef.Group1.class,
      DevCloudDef.Group2.class}, message = "sourceEnvId不能为空")
  @Schema(name = "源环境id")
  private Long sourceEnvId;

  @NotEmpty(groups = {DevCloudDef.Group1.class,}, message = "newEnv不能为空")
  @Size(groups = {DevCloudDef.Group1.class,}, max = 20, message = "newEnv长度范围最大20")
  @Schema(name = "环境")
  private String newEnv;

  @NotEmpty(groups = {DevCloudDef.Group1.class,}, message = "newNamespace不能为空")
  @Size(groups = {DevCloudDef.Group1.class,}, max = 50, message = "newNamespace长度范围最大50")
  @Schema(name = "命名空间")
  private String newNamespace;

  @NotNull(groups = {DevCloudDef.Group2.class}, message = "targetEnvId不能为空")
  @Schema(name = "目标环境id")
  private Long targetEnvId;

  @NotEmpty(groups = {DevCloudDef.Group2.class,}, message = "projectIds不能为空")
  @Schema(name = "项目id集合")
  private Set<Long> projectIds;
}
